
	@extends('admin.base')
	@section('content')
	<section class="content-header">
          <h1>
            信息输出表
            <small>preview of simple tables</small>
          </h1>
          <ol class="breadcrumb">
            <li><a href="{{url('admin')}}"><i class="fa fa-dashboard"></i> 首页</a></li>
            <li><a href="{{url('admin/friendlink')}}">友情链接信息</a></li>
            <li class="active">友情链接列表</li>
          </ol>
        </section>

        <!-- Main content -->
        <section class="content">
          <div class="row">
            <div class="col-md-12">
              <div class="box">
                <div class="box-header with-border">
                  <h3 class="box-title"><i class="fa fa-th"></i> 友情链接管理</h3>
                </div><!-- /.box-header -->
                <div class="box-body">
                  <table class="table table-bordered">
                    <tr>
                      <th style="width:60px">ID</th>
                      <th>链接名称</th>
                      <th>链接url</th>
                      <th>审核状态</th>
                      <th>添加时间</th>
                      <th>修改时间</th>
                      <th style="width: 100px">操作</th>
                    </tr>
					@foreach($list as $v)
                    <tr>
                      <td>{{$v->id}}</td>
                      <td>{{$v->linkname}}</td>
                      <td>{{$v->linkurl}}</td>
                      <td>{{$v->status == 1?"已上线":"未上线"}}</td>
                      <td>{{$v->create_at}}</td>
                      <td>{{$v->update_at}}</td>
                      <td><button onclick="doDel({{$v->id}})" class="btn btn-xs btn-danger">删除</button> 
                      <button onclick="location.href='friendlink/{{$v->id}}/edit'" class="btn btn-xs btn-info">编辑</button> </td>
                      
                    </tr>
					@endforeach
  
                  </table>
                </div><!-- /.box-body -->
                <div class="box-footer clearfix">
                  
				  {!! $list->render() !!}
                  </div>
                </div>
              </div><!-- /.box -->

              
              
            </div><!-- /.col -->
            
          </div><!-- /.row -->
         
        </section><!-- /.content -->
		<form action="" style="display:none;" id="mydeleteform" method="post">
            <input type="hidden" name="_token" value="<?php echo csrf_token(); ?>">
            <input type="hidden" name="_method" value="DELETE">
        </form>
		@endsection
		@section("myscript")
		<script type="text/javascript">
            function doDel(id){
                if(confirm('确定要删除吗？')){
                    $("#mydeleteform").attr("action","{{url('admin/friendlink')}}/"+id).submit(); 
                }
            }
		</script>
		@endsection